﻿using DAL;
using Model;

namespace BLL
{
    public class LoginBll
    {
        public LoginBll(LoginDal dal)
        {
            Dal = dal;
        }

        public LoginDal Dal { get; }


        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="l">属性</param>
        /// <returns></returns>
        public int AddLogin(Login l)
        {
            try
            {
               return Dal.AddLogin(l);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="Name">名字</param>
        /// <param name="Pwd">密码</param>
        /// <returns></returns>
        public dynamic LoginSelect(string Name, string Pwd)
        {
            try
            {
                var res = Dal.LoginSelect(Name,Pwd);
                return res;
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}